package com.kuanter.kuanterauto.utils;

import java.util.HashMap;

import com.kuanter.kuanterauto.R;

public class BrandStrToIconUtil {
	private  HashMap<String, Integer> brandToIcons;
	
	// 汽车品牌图片
	private final int[] PINPAI_IMGS_A = { R.drawable.amg,
			R.drawable.aerfaluomiou, R.drawable.asidunmading, R.drawable.anchi,
			R.drawable.aodi, R.drawable.aozimobier };

	private final int[] PINPAI_IMGS_B = { R.drawable.babosi, R.drawable.baojun,
			R.drawable.baolong, R.drawable.baoma, R.drawable.baoshijie,
			R.drawable.beijingqiche, R.drawable.beiqi, R.drawable.weiwang,
			R.drawable.benchi, R.drawable.benteng, R.drawable.bentian,
			R.drawable.biyadi, R.drawable.biaozhi, R.drawable.bieke,
			R.drawable.binli, R.drawable.bujiadi };

	private final int[] PINPAI_IMGS_C = { R.drawable.changheqiche,
			R.drawable.chuanqiyema, R.drawable.changanqiche,
			R.drawable.changchengqiche, R.drawable.changfengqiche };

	private final int[] PINPAI_IMGS_D = { R.drawable.ds, R.drawable.daqiya,
			R.drawable.dadi, R.drawable.dafa, R.drawable.dayu,
			R.drawable.dazhong, R.drawable.daoqi, R.drawable.dihao,
			R.drawable.dongfeng, R.drawable.dongnanqiche };

	private final int[] PINPAI_IMGS_F = { R.drawable.falali,
			R.drawable.feiyate, R.drawable.fengtian, R.drawable.fudiqiche,
			R.drawable.fute, R.drawable.futian };

	private final int[] PINPAI_IMGS_G = { R.drawable.gmc, R.drawable.guanggang,
			R.drawable.guangqijituan };

	private final int[] PINPAI_IMGS_H = { R.drawable.hafei, R.drawable.haima,
			R.drawable.hanma, R.drawable.heibao, R.drawable.hengtian,
			R.drawable.hongqi, R.drawable.huachen, R.drawable.huapu,
			R.drawable.huatai, R.drawable.huaxiang, R.drawable.huanghai,
			R.drawable.huodun };

	private final int[] PINPAI_IMGS_J = { R.drawable.jeepjipu, R.drawable.jiao,
			R.drawable.jili, R.drawable.jianghuai, R.drawable.jiangling,
			R.drawable.jiangnan, R.drawable.jiebao, R.drawable.jinbei,
			R.drawable.jiulong };

	private final int[] PINPAI_IMGS_K = { R.drawable.kairui,
			R.drawable.kaidilake, R.drawable.kenisaige, R.drawable.kelaisile };

	private final int[] PINPAI_IMGS_L = { R.drawable.lada,
			R.drawable.lanbojini, R.drawable.lanqiya, R.drawable.laolunshi,
			R.drawable.laosilaisi, R.drawable.leikesasi, R.drawable.leinuo,
			R.drawable.linian, R.drawable.lifan, R.drawable.lianhua,
			R.drawable.linken, R.drawable.lingmu, R.drawable.lufeng,
			R.drawable.luhu, R.drawable.lutesi, R.drawable.luofu };

	private final int[] PINPAI_IMGS_M = { R.drawable.mazida,R.drawable.mashaladi, R.drawable.maibahe, R.drawable.maikailun,
			R.drawable.mini, R.drawable.mingjue };

	private final int[] PINPAI_IMGS_N = { R.drawable.nazhijie };

	private final int[] PINPAI_IMGS_O = { R.drawable.oubao, R.drawable.oulang };

	private final int[] PINPAI_IMGS_P = { R.drawable.pajiani,
			R.drawable.pangdike };

	private final int[] PINPAI_IMGS_Q = { R.drawable.qirui, R.drawable.qichen,
			R.drawable.qiya, R.drawable.qingling, R.drawable.quanqiuying };

	private final int[] PINPAI_IMGS_R = { R.drawable.richan,
			R.drawable.rongwei, R.drawable.ruilin };

	private final int[] PINPAI_IMGS_S = { R.drawable.smart, R.drawable.spirra,
			R.drawable.sabo, R.drawable.sanling, R.drawable.shijue,
			R.drawable.shuanghuan, R.drawable.shuanglong, R.drawable.shuixing,
			R.drawable.sibalu, R.drawable.sikeda };

	private final int[] PINPAI_IMGS_T = { R.drawable.tata, R.drawable.tengshi,
			R.drawable.tianma, R.drawable.tuxing };

	private final int[] PINPAI_IMGS_W = { R.drawable.weilin,
			R.drawable.weiwang, R.drawable.weiziman, R.drawable.woerwo,
			R.drawable.wuling, R.drawable.wushiling };

	private final int[] PINPAI_IMGS_X = { R.drawable.xiyate, R.drawable.xiali,
			R.drawable.xiandai, R.drawable.xuefulan, R.drawable.xuge,
			R.drawable.xuetielong };

	private final int[] PINPAI_IMGS_Y = { R.drawable.yi_qi, R.drawable.yiweike,
			R.drawable.yingfeinidi, R.drawable.yinglunqiche,
			R.drawable.yongyuan };

	private final int[] PINPAI_IMGS_Z = { R.drawable.zhonghua,
			R.drawable.zhongxing, R.drawable.zhongtai };

	// 汽车品牌
	private final String[] PINPAI_STRS_A = { "amg", "阿尔法·罗米欧", "阿斯顿·马丁", "安驰",
			"奥迪", "奥兹莫比尔" };

	private final String[] PINPAI_STRS_B = { "巴博斯", "宝骏", "宝龙", "宝马", "保时捷",
			"北京汽车", "北汽", "北汽威旺", "奔驰", "奔腾", "本田", "比亚迪", "标致", "别克", "宾利",
			"布加迪" };

	private final String[] PINPAI_STRS_C = { "昌河汽车", "川汽野马", "长安汽车", "长城汽车",
			"长丰汽车" };

	private final String[] PINPAI_STRS_D = { "DS", "达契亚", "大迪", "大发", "大宇",
			"大众", "道奇", "帝豪", "东风汽车", "东南汽车" };

	private final String[] PINPAI_STRS_F = { "法拉利", "菲亚特", "丰田", "福迪汽车", "福特",
			"福田" };

	private final String[] PINPAI_STRS_G = { "GMC", "光冈", "广汽" };

	private final String[] PINPAI_STRS_H = { "哈飞", "海马", "悍马", "黑豹", "恒天",
			"红旗", "华晨", "华普", "华泰", "华翔", "黄海", "霍顿" };

	private final String[] PINPAI_STRS_J = { "JEEP吉普", "吉奥", "吉利", "江淮", "江铃",
			"江南", "捷豹", "金杯", "九龙" };

	private final String[] PINPAI_STRS_K = { "开瑞", "凯迪拉克", "柯尼赛格", "克莱斯勒" };

	private final String[] PINPAI_STRS_L = { "拉达", "兰博基尼", "蓝旗亚", "劳伦士",
			"劳斯莱斯", "雷克萨斯", "雷诺", "理念", "力帆", "莲花", "林肯", "铃木", "陆风", "路虎",
			"路特斯", "罗孚" };

	private final String[] PINPAI_STRS_M = { "马自达", "玛莎拉蒂", "迈巴赫", "迈凯伦", "迷你",
			"名爵" };

	private final String[] PINPAI_STRS_N = { "纳智捷" };

	private final String[] PINPAI_STRS_O = { "欧宝", "欧郎" };

	private final String[] PINPAI_STRS_P = { "帕加尼", "庞蒂克" };

	private final String[] PINPAI_STRS_Q = { "奇瑞", "启辰", "起亚", "庆铃", "全球鹰" };

	private final String[] PINPAI_STRS_R = { "日产", "荣威", "瑞麒" };

	private final String[] PINPAI_STRS_S = { "Smart", "SPIRRA", "萨博", "三菱",
			"世爵", "双环", "双龙", "水星", "斯巴鲁", "斯柯达" };

	private final String[] PINPAI_STRS_T = { "塔塔", "腾势", "天马", "土星" };

	private final String[] PINPAI_STRS_W = { "威麟", "威旺", "威兹曼", "沃尔沃", "五菱",
			"五十铃" };

	private final String[] PINPAI_STRS_X = { "西亚特", "夏利", "现代", "雪佛兰", "讴歌",
			"雪铁龙" };

	private final String[] PINPAI_STRS_Y = { "一汽", "依维柯", "英菲尼迪", "英伦汽车", "永源" };

	private final String[] PINPAI_STRS_Z = { "中华", "中兴", "众泰" };

	{
		brandToIcons = new HashMap<String, Integer>();
		// a
		for (int i = 0; i < PINPAI_IMGS_A.length; i++) {
			brandToIcons.put(PINPAI_STRS_A[i], PINPAI_IMGS_A[i]);
		}
		// b
		for (int i = 0; i < PINPAI_IMGS_B.length; i++) {
			brandToIcons.put(PINPAI_STRS_B[i], PINPAI_IMGS_B[i]);
		}
		// c
		for (int i = 0; i < PINPAI_IMGS_C.length; i++) {
			brandToIcons.put(PINPAI_STRS_C[i], PINPAI_IMGS_C[i]);
		}
		// d
		for (int i = 0; i < PINPAI_IMGS_D.length; i++) {
			brandToIcons.put(PINPAI_STRS_D[i], PINPAI_IMGS_D[i]);
		}
		// f
		for (int i = 0; i < PINPAI_IMGS_F.length; i++) {
			brandToIcons.put(PINPAI_STRS_F[i], PINPAI_IMGS_F[i]);
		}
		// g
		for (int i = 0; i < PINPAI_IMGS_G.length; i++) {
			brandToIcons.put(PINPAI_STRS_G[i], PINPAI_IMGS_G[i]);
		}
		// h
		for (int i = 0; i < PINPAI_IMGS_H.length; i++) {
			brandToIcons.put(PINPAI_STRS_H[i], PINPAI_IMGS_H[i]);
		}
		// j
		for (int i = 0; i < PINPAI_IMGS_J.length; i++) {
			brandToIcons.put(PINPAI_STRS_J[i], PINPAI_IMGS_J[i]);
		}
		// k
		for (int i = 0; i < PINPAI_IMGS_K.length; i++) {
			brandToIcons.put(PINPAI_STRS_K[i], PINPAI_IMGS_K[i]);
		}
		// l
		for (int i = 0; i < PINPAI_IMGS_L.length; i++) {
			brandToIcons.put(PINPAI_STRS_L[i], PINPAI_IMGS_L[i]);
		}

		// m
		for (int i = 0; i < PINPAI_IMGS_M.length; i++) {
			brandToIcons.put(PINPAI_STRS_M[i], PINPAI_IMGS_M[i]);
		}
		// n
		for (int i = 0; i < PINPAI_IMGS_N.length; i++) {
			brandToIcons.put(PINPAI_STRS_N[i], PINPAI_IMGS_N[i]);
		}
		// o
		for (int i = 0; i < PINPAI_IMGS_O.length; i++) {
			brandToIcons.put(PINPAI_STRS_O[i], PINPAI_IMGS_O[i]);
		}
		// p
		for (int i = 0; i < PINPAI_IMGS_P.length; i++) {
			brandToIcons.put(PINPAI_STRS_P[i], PINPAI_IMGS_P[i]);
		}
		// q
		for (int i = 0; i < PINPAI_IMGS_Q.length; i++) {
			brandToIcons.put(PINPAI_STRS_Q[i], PINPAI_IMGS_Q[i]);
		}
		// r
		for (int i = 0; i < PINPAI_IMGS_R.length; i++) {
			brandToIcons.put(PINPAI_STRS_R[i], PINPAI_IMGS_R[i]);
		}
		// s
		for (int i = 0; i < PINPAI_IMGS_S.length; i++) {
			brandToIcons.put(PINPAI_STRS_S[i], PINPAI_IMGS_S[i]);
		}
		// t
		for (int i = 0; i < PINPAI_IMGS_T.length; i++) {
			brandToIcons.put(PINPAI_STRS_T[i], PINPAI_IMGS_T[i]);
		}
		// w
		for (int i = 0; i < PINPAI_IMGS_W.length; i++) {
			brandToIcons.put(PINPAI_STRS_W[i], PINPAI_IMGS_W[i]);
		}
		// x
		for (int i = 0; i < PINPAI_IMGS_X.length; i++) {
			brandToIcons.put(PINPAI_STRS_X[i], PINPAI_IMGS_X[i]);
		}
		// y
		for (int i = 0; i < PINPAI_IMGS_Y.length; i++) {
			brandToIcons.put(PINPAI_STRS_Y[i], PINPAI_IMGS_Y[i]);
		}
		// z
		for (int i = 0; i < PINPAI_IMGS_Z.length; i++) {
			brandToIcons.put(PINPAI_STRS_Z[i], PINPAI_IMGS_Z[i]);
		}
	}
	
	public  int getBrandIcon(String brandStr){
		return brandToIcons.get(brandStr);
	}

}
